package com.automannn.springboot.practice.beanDefinitionLoader;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.BeanDefinitionLoader;

import java.util.Arrays;

/**
 * @author chenkh
 * @time 2021/10/8 11:27
 */
public class BeanDefinitionLoaderTest {
    public static void main(String[] args) {
        DefaultListableBeanFactory beanFactory =new DefaultListableBeanFactory();
        BeanDefinitionLoader beanDefinitionLoader = new BeanDefinitionLoader(beanFactory,"com.automannn.springboot.practice.normalBean");
        beanDefinitionLoader.load();

        System.out.println(beanFactory.getBeanDefinitionCount());
        System.out.println(Arrays.toString(beanFactory.getBeanDefinitionNames()));
    }
}
